<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en">

<head profile="http://gmpg.org/xfn/11">
<meta content="风雪之隅" name="application-name" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta content="name=PHP源码分析;action-uri=/php-internal;icon-uri=/favicon.ico" name="msapplication-task" />
<meta content="name=PHP应用;action-uri=/php;icon-uri=/favicon.ico" name="msapplication-task" />
<meta content="name=JS和CSS;action-uri=/jscss;icon-uri=/favicon.ico" name="msapplication-task" />
<meta content="name=作者随笔;action-uri=/notes;icon-uri=/favicon.ico" name="msapplication-task" />
<meta content="name=版权声明;action-uri=/licence;icon-uri=/favicon.ico" name="msapplication-task" />
<title>实现PHP的编译执行分离(separating compilation and execution) | 风雪之隅</title>
<link rel="stylesheet" href="http://www.laruence.com/wp-content/themes/googlechrome/blueprint/screen.css" type="text/css" media="screen, projection" />
<link rel="stylesheet" href="http://www.laruence.com/wp-content/themes/googlechrome/style.css" type="text/css" media="screen, projection" />
<link rel="stylesheet" href="http://www.laruence.com/wp-content/themes/googlechrome/blueprint/print.css" type="text/css" media="print" />
<!--[if IE]><link rel="stylesheet" href="http://www.laruence.com/wp-content/themes/googlechrome/blueprint/ie.css" type="text/css" media="screen, projection" /><![endif]-->
<!--[if lte IE 6]>
<style>
.span-16 {width:610px;}
#profile {overflow: visible;}
#meme {position:absolute;}
</style>
<![endif]-->
<link rel="pingback" href="http://www.laruence.com/xmlrpc.php" />
<link rel="alternate" type="application/rss+xml" title="风雪之隅 &raquo; Feed" href="http://www.laruence.com/feed" />
<link rel="alternate" type="application/rss+xml" title="风雪之隅 &raquo; Comments Feed" href="http://www.laruence.com/comments/feed" />
<link rel="alternate" type="application/rss+xml" title="风雪之隅 &raquo; 实现PHP的编译执行分离(separating compilation and execution) Comments Feed" href="http://www.laruence.com/2008/08/14/250.html/feed" />
<link rel='stylesheet' id='subscribe_me-css'  href='http://www.laruence.com/wp-content/plugins/sem-subscribe-me/css/styles.css?ver=20090903' type='text/css' media='all' />
<script type='text/javascript' src='http://www.laruence.com/wp-includes/js/l10n.js?ver=20101110'></script>
<script type='text/javascript' src='http://www.laruence.com/wp-includes/js/jquery/jquery.js?ver=1.4.4'></script>
<script type='text/javascript' src='http://www.laruence.com/wp-includes/js/comment-reply.js?ver=20090102'></script>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.laruence.com/xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://www.laruence.com/wp-includes/wlwmanifest.xml" /> 
<link rel='index' title='风雪之隅' href='http://www.laruence.com' />
<link rel='start' title='VIM中文乱码解决方案' href='http://www.laruence.com/2007/10/03/5.html' />
<link rel='prev' title='深入理解Zend SAPIs(Zend SAPI Internals)' href='http://www.laruence.com/2008/08/12/180.html' />
<link rel='next' title='PHP 源代码分析 V0.0.2' href='http://www.laruence.com/2008/08/15/274.html' />
<meta name="generator" content="WordPress 3.1.2" />
<link rel='shortlink' href='http://www.laruence.com/?p=250' />

<!-- All in One SEO Pack 1.6.13.2 by Michael Torbert of Semper Fi Web Design[871,969] -->
<meta name="description" content="本文介绍了如何实现PHP的执行和编译分离， 如何实现PHP源码的加密" />
<meta name="keywords" content="php,加密,zend,执行,编译,分离,zend/php" />
<link rel="canonical" href="http://www.laruence.com/2008/08/14/250.html" />
<!-- /all in one seo pack -->
<script type="text/javascript" src="http://www.laruence.com/wp-content/plugins/shjs-syntax-hiliter/shjs/sh_main.js"></script><link type="text/css" rel="stylesheet" href="http://www.laruence.com/wp-content/plugins/shjs-syntax-hiliter/shjs/css/sh_ir_black.css">	<style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>
</head>
<body class="single single-post postid-250 single-format-standard">
<div class="wrapper">
<div class='container'>
  
	<div class='headermenu span-24'>
        <ul>
		<li class="first" id="firstcurrent"><a href="http://www.laruence.com" title="Home">Home</a></li>
			        <li
			>
            <a href="http://www.laruence.com/php-internal" title="PHP源码分析">PHP源码分析</a></li>

			        <li
			>
            <a href="http://www.laruence.com/php" title="PHP应用">PHP应用</a></li>

			        <li
			>
            <a href="http://www.laruence.com/jscss" title="JS/CSS">JS/CSS</a></li>

			        <li
			>
            <a href="http://www.laruence.com/notes" title="随笔">随笔</a></li>

			        <li
			>
            <a href="http://www.laruence.com/guestbook" title="留言">留言</a></li>

			        <li
			 class="last">
            <a href="http://www.laruence.com/licence" title="博客声明">博客声明</a></li>

		        </ul>
	</div>
  
    <div class='header span-24'>
        <div class="alignright" style="width:310px">
			<div id="searchbox">
            <form method="get" id="searchform" action="http://www.laruence.com/">
			<input type="text" name="s" id="s" class="search_input" value="" />
			<input type="image" src="http://www.laruence.com/wp-content/themes/googlechrome/images/transparent.gif" id="searchsubmit" />
			</form>
            </div>
	        <a class="menubookmark" href="http://www.addthis.com/bookmark.php" title="Bookmark and Share"></a>
            <a class="menufeed" href="http://www.laruence.com/feed" title="Subscribe Feed"></a>
        </div>
        <a class="menuhome" href="http://www.laruence.com" title="Home"></a>&nbsp;
		<span class="blogtitle"><a href="http://www.laruence.com" title="Home">风雪之隅</a></span>
	</div>
    
    <div class='msgbartop span-24'><img src="http://www.laruence.com/wp-content/themes/googlechrome/images/msgbartop.gif" alt="msgbartop" /></div>
    <div class='msgbar span-24'>
		PHP语言, PHP扩展, Zend引擎相关的研究,技术,新闻分享 &#8211; 左手代码 右手诗    </div>
    <div class='msgbarbottom span-24'><img src="http://www.laruence.com/wp-content/themes/googlechrome/images/msgbarbottom.gif" alt="msgbarbottom" /></div>
    
    <div class='content span-16'>
           			<div class="post-250 post type-post status-publish format-standard hentry category-phpext category-php-usage category-php-internal tag-php tag-zendphp" id="post-250">
                <h1>14 Aug 08 <a href="http://www.laruence.com/2008/08/14/250.html" rel="bookmark" title="Permanent Link to 实现PHP的编译执行分离(separating compilation and execution)">实现PHP的编译执行分离(separating compilation and execution)</a> <g:plusone size="small" href="http://www.laruence.com/2008/08/14/250.html"></g:plusone></h1>       
                <div class="copyright">
<ul>
<li>作者: <a href="http://www.laruence.com">Laruence</a>(<a href="http://www.twitter.com/laruence" target="meme" title="Twitter"><img src="/images/ico-twitter.png" /></a> <a href="http://t.sina.com/laruence" target="meme" title="新浪微博"><img src="/images/ico-sina.png" /></a> <a href="http://fusion.google.com/add?feedurl=http://www.laruence.com/feed" target="meme" title="Google阅读器"><img src="/images/ico-google.png" /></a> <a href="mailto:laruence@yahoo.com.cn" target="meme" title="邮件"><img src="/images/ico-mail.png" /></a>)</li>
<li>本文地址: <a href="http://www.laruence.com/2008/08/14/250.html" title="Permanet Link to 实现PHP的编译执行分离(separating compilation and execution)">http://www.laruence.com/2008/08/14/250.html</a></li>
</li>
<li>转载请注明出处 </li>
</ul></div>
<p>   刚刚在PHP群内和大家聊天，应承了大家要写一个关于如何实现PHP源码加密的文章， 借着这会QA在冒烟的机会，就这个问题，我写点思路。<br />
   我之前的文章介绍过， ZE（Zend engine) 执行一个PHP脚本会经历编译－>执行， 只不过它每次执行都会去重新编译PHP文件。并没有实现编译和执行分离。<br />
   在ZE的编译和执行阶段，有俩个重要的函数:</p>
<pre name="code" class="sh_php" linenum="off">
ZEND_API zend_op_array *(*zend_compile_file)(zend_file_handle *file_handle, int type TSRMLS_DC);
</pre>
<p>   和</p>
<pre name="code" class="sh_php" linenum="off">
  ZEND_API void (*zend_execute)(zend_op_array *op_array TSRMLS_DC);
  </pre>
<p>  zend_compile_file负责将要执行的脚本文件编译成由ZE的基本指令序列构成的op codes , 然后将op codes交由zend_execute执行，从而得到我们脚本的结果。</p>
<p>  所以，我们完全可以通过修改默认的zend_complie_file和zend_execute来实现，PHP的执行和编译分离，进一步，我们还可以再这个基础上实现，对我们脚本的加密和解密。</p>
<p>  我们通过一个PHP扩展模块来实现这个功能， 首先，我们需要在模块初始化的时候:</p>
<pre name="code" class="sh_php" linenum="off">
 PHP_MINIT_FUNCTION(sample)
{
    old_compile_file = zend_compile_file;  //保存现场
    old_execute = zend_execute;

    zend_compile_file = my_compile_file; //截获
    zend_execute = my_execute;
    return SUCCESS;
}
</pre>
<p> 在我们的my_compile_file中，判断我们的文件是否是编译过的文件，假设后缀名是 *.ze</p>
<pre name="code" class="sh_php" linenum="off">
    static zend_op_array *my_compile_file(zend_file_handle *file_handle, int type TSRMLS_DC)
{
    if(strstr(file_handle-&gt;filename, &quot;.ze&quot;) != NULL){//是编译过的文件。
         直接返回文件内容.
    }
   zend_op_array *op_array;

   op_array = old_compile_file (file_handle, type TSRMLS_CC); //调用默认的compile,截获输出

   if(op_array){
       保存op_array;
   }
    return op_array;
}
</pre>
<p>这样，我们就实现了， 对已经编译文件的支持，和对文件编译的支持。<br />
然后，需要编写我们的执行函数:</p>
<pre name="code" class="sh_php" linenum="off">
static void my_execute(zend_op_array *op_array TSRMLS_DC)
{
    old_execute(op_array TSRMLS_DC); //简单交由默认执行函数执行。
}
</pre>
<p>也许你要问为什么要包装以后的执行函数， 呵呵，我只是为了说明，一种方式，就是可以截获这个东东而已。。 有什么用，就看读者你有什么要求能通过这个方式实现了 ；）</p>
<p>恩，写到这里， 你也许就明白了， 如果想要对文件加密， 那么就定义个加密文件类型，比如 *.zec， 然后在my_compile_file中，判断文件类型，如果是加密文件，那么就执行解密，；），嘿嘿，简答吧？</p>
<p>至于怎么加密，，，那就要问你自己了，你想用什么方式，，，但是，记住，要可逆的哦～～ ^_^。<script type="text/javascript" src="http://www.laruence.com/wp-content/plugins/shjs-syntax-hiliter/shjs/lang/sh_php.js"></script><script type="text/javascript" src="http://www.laruence.com/wp-content/plugins/shjs-syntax-hiliter/shjs/lang/sh_php.js"></script><script type="text/javascript" src="http://www.laruence.com/wp-content/plugins/shjs-syntax-hiliter/shjs/lang/sh_php.js"></script><script type="text/javascript" src="http://www.laruence.com/wp-content/plugins/shjs-syntax-hiliter/shjs/lang/sh_php.js"></script><script type="text/javascript" src="http://www.laruence.com/wp-content/plugins/shjs-syntax-hiliter/shjs/lang/sh_php.js"></script></p>
<br /><div style='float:left'><!-- Baidu Button BEGIN -->
    <div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare">
        <span class="bds_more">分享到：</span>
        <a class="bds_qzone"></a>
        <a class="bds_tsina"></a>
        <a class="bds_tqq"></a>
        <a class="bds_renren"></a>
		<a class="shareCount"></a>
    </div>
<script type="text/javascript" id="bdshare_js" data="type=tools&uid=375788" ></script>
<script type="text/javascript" id="bdshell_js"></script>
<script type="text/javascript">
	document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?t=" + new Date().getHours();
</script>
<!-- Baidu Button END --></div><br /><br /><br /><h2  class="related_post_title">Related Posts:</h2><ul class="related_post"><li><a href="http://www.laruence.com/2008/09/23/539.html" title="使用PHP Embed SAPI实现Opcodes查看器">使用PHP Embed SAPI实现Opcodes查看器</a></li><li><a href="http://www.laruence.com/2008/09/19/520.html" title="深入理解PHP原理之变量分离/引用(Variables Separation)">深入理解PHP原理之变量分离/引用(Variables Separation)</a></li><li><a href="http://www.laruence.com/2008/08/26/463.html" title="深入理解PHP原理之变量作用域(Scope in PHP)">深入理解PHP原理之变量作用域(Scope in PHP)</a></li><li><a href="http://www.laruence.com/2008/08/22/412.html" title="深入理解PHP原理之变量(Variables inside PHP)">深入理解PHP原理之变量(Variables inside PHP)</a></li><li><a href="http://www.laruence.com/2008/08/15/274.html" title="PHP 源代码分析 V0.0.2">PHP 源代码分析 V0.0.2</a></li><li><a href="http://www.laruence.com/2008/08/12/180.html" title="深入理解Zend SAPIs(Zend SAPI Internals)">深入理解Zend SAPIs(Zend SAPI Internals)</a></li><li><a href="http://www.laruence.com/2008/08/12/164.html" title="深入理解PHP原理之函数(Introspecting PHP Function)">深入理解PHP原理之函数(Introspecting PHP Function)</a></li><li><a href="http://www.laruence.com/2008/08/11/147.html" title="深入浅出PHP(Exploring PHP)">深入浅出PHP(Exploring PHP)</a></li><li><a href="http://www.laruence.com/2008/06/18/221.html" title="深入理解PHP原理之Opcodes">深入理解PHP原理之Opcodes</a></li><li><a href="http://www.laruence.com/2007/12/16/308.html" title="PHP:Header">PHP:Header</a></li></ul>                                                <p>Tags: <a href="http://www.laruence.com/tag/php" rel="tag">PHP</a>, <a href="http://www.laruence.com/tag/zendphp" rel="tag">Zend/PHP</a></p>                                <div style="clear:both;"></div>
                <div class="postmeta">Filed in <a href="http://www.laruence.com/category/phpext" title="View all posts in PHP Extension" rel="category tag">PHP Extension</a>, <a href="http://www.laruence.com/category/php-usage" title="View all posts in PHP应用" rel="category tag">PHP应用</a>, <a href="http://www.laruence.com/category/php-internal" title="View all posts in PHP源码分析" rel="category tag">PHP源码分析</a> </div>
			</div>                

            <div class="navigation">
                <div class="alignleft">&laquo; <a href="http://www.laruence.com/2008/08/12/180.html" rel="prev">深入理解Zend SAPIs(Zend SAPI Internals)</a></div>
                <div class="alignright"><a href="http://www.laruence.com/2008/08/15/274.html" rel="next">PHP 源代码分析 V0.0.2</a> &raquo;</div>
            </div>

			
<!-- You can start editing here. Mark for searching comment -->

	<h3 id="comments">11 Responses to &#8220;实现PHP的编译执行分离(separating compilation and execution)&#8221;</h3>

	<!-- Comment page numbers -->
		<!-- End comment page numbers -->

	<ol class="commentlist" style="list-style-type: none;">

	
		<li class="alt" id="comment-181476">
	        <img alt='' src='http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=32' class='avatar avatar-32 photo avatar-default' height='32' width='32' />			<span title="182.92.183.*"><a href='http://www.keything.net/%e9%a3%8e%e9%9b%aa%e4%b9%8b%e9%9a%85-%e9%b8%9f%e5%93%a5%e6%96%87%e7%ab%a0%e6%b1%87%e6%80%bb/' rel='external nofollow' class='url'>风雪之隅-鸟哥文章汇总 | 互联网菜鸟</a></span> | <small class="commentmetadata">30 Nov 2014 20:08</a> </small>
			
			<p>[...] Aug 08&nbsp;实现PHP的编译执行分离(separating compilation and execution)&nbsp;     12 Aug 08&nbsp;深入理解Zend SAPIs(Zend SAPI Internals)    12 Aug [...]</p>
		</li>

	
	
		<li id="comment-32840">
	        <img alt='' src='http://www.gravatar.com/avatar/60dca674ef8550eafc668502428768d1?s=32&amp;d=http%3A%2F%2Fwww.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&amp;r=G' class='avatar avatar-32 photo' height='32' width='32' />			<span title="124.205.108.*">bittercookie</span> | <small class="commentmetadata">21 Mar 2013 17:58</a> </small>
			
			<p>请问一下，如果这种方式，如果使用了apc的话，兼容性上是否有问题，配置上加密模块和apc模块顺序上有没有强制性的要求? 本人菜鸟，求轻拍</p>
		</li>

	
	
		<li class="alt" id="comment-6377">
	        <img alt='' src='http://www.gravatar.com/avatar/1e81d83e778f072e30f64a0375b862a4?s=32&amp;d=http%3A%2F%2Fwww.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&amp;r=G' class='avatar avatar-32 photo' height='32' width='32' />			<span title="221.217.53.*"><a href='http://zjczoo.sinaapp.com' rel='external nofollow' class='url'>bird</a></span> | <small class="commentmetadata">03 Apr 2012 21:05</a> </small>
			
			<p>鸟哥，什么群啊，我能加吗？</p>
		</li>

	
	
		<li id="comment-3934">
	        <img alt='' src='http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=32' class='avatar avatar-32 photo avatar-default' height='32' width='32' />			<span title="173.248.187.*"><a href='http://www.w3hacker.com/?p=248' rel='external nofollow' class='url'>实现PHP的编译执行分离(separating compilation and execution) | 万维网黑客联盟</a></span> | <small class="commentmetadata">20 Mar 2011 17:37</a> </small>
			
			<p>[...] 本文地址: <a href="http://www.laruence.com/2008/08/14/250.html" rel="nofollow">http://www.laruence.com/2008/08/14/250.html</a> [...]</p>
		</li>

	
	
		<li class="alt" id="comment-2207">
	        <img alt='' src='http://www.gravatar.com/avatar/1069e488bedd1507ae86a217e5e4d3bd?s=32&amp;d=http%3A%2F%2Fwww.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&amp;r=G' class='avatar avatar-32 photo' height='32' width='32' />			<span title="61.135.165.*"><a href='http://www.laruence.com' rel='external nofollow' class='url'>雪候鸟</a></span> | <small class="commentmetadata">11 Sep 2009 11:13</a> </small>
			
			<p>@phper 惭愧, 我没有测试过,只是谈个想法, 呵呵.  这块要实现,  还是要做很大实验的.</p>
		</li>

	
	
		<li id="comment-2206">
	        <img alt='' src='http://www.gravatar.com/avatar/bdef43f7dfa0622fa0851158563df98a?s=32&amp;d=http%3A%2F%2Fwww.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&amp;r=G' class='avatar avatar-32 photo' height='32' width='32' />			<span title="116.16.164.*">phper</span> | <small class="commentmetadata">11 Sep 2009 01:01</a> </small>
			
			<p>不加密怎么样保存op_array？怎么直接返回文件内容？<br />
zend_op_array好像是链表类的结构体.<br />
您有没有测试过?有实例代码吗?</p>
<p>if(op_array){<br />
       保存op_array;<br />
   }</p>
<p>if(strstr(file_handle-&gt;filename, &#8220;.ze&#8221;) != NULL){//是编译过的文件。<br />
         直接返回文件内容.<br />
    }</p>
		</li>

	
	
		<li class="alt" id="comment-1724">
	        <img alt='' src='http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=32' class='avatar avatar-32 photo avatar-default' height='32' width='32' />			<span title="120.83.209.*">Anonymous</span> | <small class="commentmetadata">12 May 2009 16:55</a> </small>
			
			<p>最近研究這方面，在源代碼級別上開發有很多方面可以應用。</p>
		</li>

	
	
		<li id="comment-53">
	        <img alt='' src='http://www.gravatar.com/avatar/1069e488bedd1507ae86a217e5e4d3bd?s=32&amp;d=http%3A%2F%2Fwww.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&amp;r=G' class='avatar avatar-32 photo' height='32' width='32' />			<span title="202.165.107.*"><a href='http://www.laruence.com' rel='external nofollow' class='url'>雪候鸟</a></span> | <small class="commentmetadata">20 Aug 2008 23:29</a> </small>
			
			<p>恩对，APC的实现原理和这个差不多，一般来说会存在内存,或者类dbm的数据库中。</p>
		</li>

	
	
		<li class="alt" id="comment-52">
	        <img alt='' src='http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=32' class='avatar avatar-32 photo avatar-default' height='32' width='32' />			<span title="116.245.202.*">Leric</span> | <small class="commentmetadata">20 Aug 2008 22:56</a> </small>
			
			<p>估计APC之类的opcode缓存就是这么实现的吧，也不知道那些缓存的东西都放哪儿了</p>
		</li>

	
	
		<li id="comment-31">
	        <img alt='' src='http://www.gravatar.com/avatar/1069e488bedd1507ae86a217e5e4d3bd?s=32&amp;d=http%3A%2F%2Fwww.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D32&amp;r=G' class='avatar avatar-32 photo' height='32' width='32' />			<span title="221.216.65.*"><a href='http://www.laruence.com' rel='external nofollow' class='url'>雪候鸟</a></span> | <small class="commentmetadata">16 Aug 2008 00:28</a> </small>
			
			<p>呵呵，人各有志么，我只是说个实现方式。。<br />
我是坚实的开源拥护者。</p>
		</li>

	
	
		<li class="alt" id="comment-30">
	        <img alt='' src='http://www.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=32' class='avatar avatar-32 photo avatar-default' height='32' width='32' />			<span title="125.122.52.*"><a href='http://onemouse.cn' rel='external nofollow' class='url'>guoxiaod</a></span> | <small class="commentmetadata">16 Aug 2008 00:17</a> </small>
			
			<p>为什么要为 中国的开源事业制造绊脚石呢？</p>
		</li>

	
	
	</ol>

<!-- Comment page numbers -->
<!-- End comment page numbers -->

 


<h3 id="respond">Leave a Reply</h3>


<form action="http://www.laruence.com/wp-comments-post.php" method="post" id="commentform">


<p><input type="text" name="author" id="author" value="" size="22" tabindex="1" />
<label for="author"><small>Name </small></label></p>

<p><input type="text" name="email" id="email" value="" size="22" tabindex="2" />
<label for="email"><small>Mail (will not be published) </small></label></p>

<p><input type="text" name="url" id="url" value="" size="22" tabindex="3" />
<label for="url"><small>Website</small></label></p>


<!--<p><small><strong>XHTML:</strong> You can use these tags: <code>&lt;a href=&quot;&quot; title=&quot;&quot;&gt; &lt;abbr title=&quot;&quot;&gt; &lt;acronym title=&quot;&quot;&gt; &lt;b&gt; &lt;blockquote cite=&quot;&quot;&gt; &lt;cite&gt; &lt;code&gt; &lt;del datetime=&quot;&quot;&gt; &lt;em&gt; &lt;i&gt; &lt;q cite=&quot;&quot;&gt; &lt;strike&gt; &lt;strong&gt; </code></small></p>-->

<p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>

<p><input name="submit" type="submit" id="submit" tabindex="5" value="Submit Comment" />
<input type="hidden" name="comment_post_ID" value="250" />
</p>

<div id="captchaImgDiv">

<div id="captchaSizeDivLarge"><img id="si_image_com" class="si-captcha" src="http://www.laruence.com/wp-content/plugins/si-captcha-for-wordpress/captcha-secureimage/securimage_show.php?si_form_id=com" alt="CAPTCHA Image" title="CAPTCHA Image" />
<div id="si_flash_com">
        <object type="application/x-shockwave-flash"
                data="/wp-content/plugins/si-captcha-for-wordpress/captcha-secureimage/securimage_play.swf?si_form_id=com&amp;bgColor1=#8E9CB6&amp;bgColor2=#fff&amp;iconColor=#000&amp;roundedCorner=5&amp;audio=/wp-content/plugins/si-captcha-for-wordpress/captcha-secureimage/securimage_play.php?si_form_id=com"
                id="SecurImage_as3_com" width="19" height="19" align="middle">
			    <param name="allowScriptAccess" value="sameDomain" />
			    <param name="allowFullScreen" value="false" />
			    <param name="movie" value="/wp-content/plugins/si-captcha-for-wordpress/captcha-secureimage/securimage_play.swf?si_form_id=com&amp;bgColor1=#8E9CB6&amp;bgColor2=#fff&amp;iconColor=#000&amp;roundedCorner=5&amp;audio=/wp-content/plugins/si-captcha-for-wordpress/captcha-secureimage/securimage_play.php?si_form_id=com" />
			    <param name="quality" value="high" />
			    <param name="bgcolor" value="#ffffff" />
		</object></div>
            <div id="si_refresh_com">
<a href="#" rel="nofollow" title="Refresh Image" onclick="document.getElementById('si_image_com').src = 'http://www.laruence.com/wp-content/plugins/si-captcha-for-wordpress/captcha-secureimage/securimage_show.php?si_form_id=com&amp;sid=' + Math.random(); return false;">
      <img id="captchaImgRefresh" src="http://www.laruence.com/wp-content/plugins/si-captcha-for-wordpress/captcha-secureimage/images/refresh.png" alt="Refresh Image" onclick="this.blur();" /></a>
  </div>
  </div>
<div id="captchaInputDiv"><input id="captcha_code" name="captcha_code" type="text" value="" tabindex="4"  />
 <label id="captcha_code_label" for="captcha_code">CAPTCHA Code</label><span class="required"> *</span>
 </div>
</div>
      <script type='text/javascript'>
          var sUrlInput = document.getElementById("comment");
                  var oParent = sUrlInput.parentNode;
          var sSubstitue = document.getElementById("captchaImgDiv");
                  oParent.appendChild(sSubstitue, sUrlInput);
      </script>
            <noscript>
          <style type='text/css'>#submit {display:none;}</style><br />           <input name="submit" type="submit" id="submit-alt" tabindex="6" value="Submit Comment" />
          </noscript>
  

	<p style="clear: both;" class="subscribe-to-comments">
	<input type="checkbox" name="subscribe" id="subscribe" value="subscribe" style="width: auto;" />
	<label for="subscribe">Notify me of followup comments via e-mail</label>
	</p>


<p style="display: none;"><input type="hidden" id="akismet_comment_nonce" name="akismet_comment_nonce" value="5168ce0d6e" /></p>
</form>



		
				
			<div style="clear:both"></div>
			<div class="navigation">
			</div>
    </div>
      
	    <div class='sidebar span-8 last'>
		<div class="sidebarboxtop"><img src="http://www.laruence.com/wp-content/themes/googlechrome/images/sidebartop.gif" alt="sidebartop" /></div><div class="sidebarbox"><h3>  </h3>			<div class="textwidget"><!--<div id="meme">
            <a href="http://www.twitter.com/laruence" target="meme" title="Twitter"><img src="/images/ico-twitter.png" /></a>
            <a href="http://t.sina.com/laruence" target="meme" title="新浪微博"><img src="/images/ico-sina.png" /></a>
            <a href="http://fusion.google.com/add?feedurl=http://www.laruence.com/feed" target="meme" title="Google阅读器"><img src="/images/ico-google.png" /></a>
            <a href="mailto:laruence@yahoo.com.cn" target="meme" title="邮件"><img src="/images/ico-mail.png" /></a>
</div>
-->
<div class="weibo" id="meme"><iframe width="136" height="24" frameborder="0" allowtransparency="true" marginwidth="0" marginheight="0" scrolling="no" border="0" src="http://widget.weibo.com/relationship/followbutton.php?language=zh_cn&width=136&height=24&uid=1170999921&style=2&btn=red&dpc=1"></iframe></div>
<div id="profile">
   <img class="avatar" src="http://www.laruence.com/images/gavatar.png?orig=http://tp2.sinaimg.cn/1170999921/50/5606703689/1" height=50 width=50  />
   <span class="name">Laruence</span>
   <p class="intro">
      <a href="http://www.php.net/" target="_blank" style="color:#000">PHP</a>开发组成员, <a href="http://www.zend.com/" style="color:#000">Zend</a>兼职顾问, PHP7核心开发者, <a href="http://pecl.php.net/yaf" target="_blank" style="color:#000">Yaf</a>, <a href="http://pecl.php.net/yar" target="_blank" style="color:#000">Yar</a>, <a href="http://pecl.php.net/Yac" target="_blank" style="color:#000">Yac</a>等项目作者.
   </p>
</div>
</div>
		</div><div class="sidebarboxbottom"><img src="http://www.laruence.com/wp-content/themes/googlechrome/images/sidebarbottom.gif" alt="sidebarbottom" /></div><div class="sidebarboxtop"><img src="http://www.laruence.com/wp-content/themes/googlechrome/images/sidebartop.gif" alt="sidebartop" /></div><div class="sidebarbox"><h3>OpenSource Projects</h3>			<div class="textwidget"><div id="projects" style="line-height:22px">
<a href="http://pecl.php.net/package/yaf" target='_blank'>Yaf</a>: PHP Framework in PHP extension<br/>
 
<a href="http://pecl.php.net/package/yar" target='_blank'>Yar</a>: Light, concurrent RPC framework<br/>

<a href="http://pecl.php.net/yac"  target='_blank'>Yac</a>: PHP Contents cache<br>

<a href="https://github.com/laruence/yaconf"  target='_blank'>Yaconf</a>: PHP Configurations Container<br>

<a href="http://pecl.php.net/package/taint" target='_blank'>Taint</a>: XSS code sniffer<br/>

<a href="http://pecl.php.net/package/lua" target='_blank'>Lua</a>: Embedded lua interpreter<br/>

<a href="http://pecl.php.net/package/msgpack" target='_blank'>MsgPack</a>:MessagePack in PHP extension<br/>

<a href="http://pecl.php.net/package/couchbase" target='_blank'>Couchbase</a>: Libcouchbase wrapper<br/>
 
See also: <a href="http://github.com/laruence">laruence@github</a>
</div></div>
		</div><div class="sidebarboxbottom"><img src="http://www.laruence.com/wp-content/themes/googlechrome/images/sidebarbottom.gif" alt="sidebarbottom" /></div><div class="sidebarboxtop"><img src="http://www.laruence.com/wp-content/themes/googlechrome/images/sidebartop.gif" alt="sidebartop" /></div><div class="sidebarbox"><h3>Advanced Random Posts</h3><ul class="advanced-random-posts"><li><a href="http://www.laruence.com/2010/09/27/1754.html" title="PHP stream未能及时清理现场导致Core的bug" >PHP stream未能及时清理现场导致Core的bug</a></li>
<li><a href="http://www.laruence.com/2010/07/16/1638.html" title="Facebook发布又一PHP改进项目XHP" >Facebook发布又一PHP改进项目XHP</a></li>
<li><a href="http://www.laruence.com/2011/09/30/2179.html" title="PHP正则之递归匹配" >PHP正则之递归匹配</a></li>
<li><a href="http://www.laruence.com/2009/07/19/1003.html" title="使用gettext来支持PHP的多语言" >使用gettext来支持PHP的多语言</a></li>
<li><a href="http://www.laruence.com/2009/05/21/829.html" title="JS文件装载器(Eve Js Loader)" >JS文件装载器(Eve Js Loader)</a></li>
</ul></div><div class="sidebarboxbottom"><img src="http://www.laruence.com/wp-content/themes/googlechrome/images/sidebarbottom.gif" alt="sidebarbottom" /></div><div class="sidebarboxtop"><img src="http://www.laruence.com/wp-content/themes/googlechrome/images/sidebartop.gif" alt="sidebartop" /></div><div class="sidebarbox"><h3>Recent Comments</h3><ul id="recentcomments"><li class="recentcomments"><a href='http://null' rel='external nofollow' class='url'>ordinarykigy</a> on <a href="http://www.laruence.com/2009/08/31/1072.html/comment-page-1#comment-199411">纯属娱乐(彩蛋)</a></li><li class="recentcomments">flycat on <a href="http://www.laruence.com/guestbook/comment-page-17#comment-199394">留言</a></li><li class="recentcomments"><a href='http://www.iloveyaf.com/2015/09/12/44%ef%bc%9a%e4%b8%8e%e4%bc%97%e4%b8%8d%e5%90%8c%e7%9a%84-yaf/' rel='external nofollow' class='url'>44：与众不同的 YAF | YOF 文档</a> on <a href="http://www.laruence.com/2012/09/16/2791.html/comment-page-1#comment-199353">Yaf and Phalcon, which is faster?</a></li><li class="recentcomments">sky on <a href="http://www.laruence.com/2009/08/31/1072.html/comment-page-1#comment-199311">纯属娱乐(彩蛋)</a></li><li class="recentcomments"><a href='http://www.be1stseo.com/historyofalgorithm/' rel='external nofollow' class='url'>วิธีทํา seo facebook</a> on <a href="http://www.laruence.com/2008/04/14/318.html/comment-page-1#comment-199292">PHP实现异步调用方法研究</a></li><li class="recentcomments">泡泡 on <a href="http://www.laruence.com/2010/05/26/1541.html/comment-page-1#comment-199235">PHP类型转换相关的一个Bug</a></li><li class="recentcomments"><a href='http://pengjian.me/2015/09/php%e5%ae%9e%e7%8e%b0%e5%bc%82%e6%ad%a5%e8%b0%83%e7%94%a8%e6%96%b9%e6%b3%95%e7%a0%94%e7%a9%b6/' rel='external nofollow' class='url'>PHP实现异步调用方法研究 | 我就是我</a> on <a href="http://www.laruence.com/2008/04/14/318.html/comment-page-1#comment-199211">PHP实现异步调用方法研究</a></li><li class="recentcomments"><a href='http://ysq.me' rel='external nofollow' class='url'>RDY</a> on <a href="http://www.laruence.com/2015/06/19/3063.html/comment-page-1#comment-199192">让你的PHP7更快(GCC PGO)</a></li><li class="recentcomments">Ken on <a href="http://www.laruence.com/guestbook/comment-page-17#comment-199191">留言</a></li><li class="recentcomments"><a href='https://www.youtube.com/watch?v=gAWhRCI6EMU' rel='external nofollow' class='url'>Info adicional</a> on <a href="http://www.laruence.com/2009/07/28/1030.html/comment-page-1#comment-199181">Linux上配置Nginx+PHP5(FastCGI)</a></li></ul></div><div class="sidebarboxbottom"><img src="http://www.laruence.com/wp-content/themes/googlechrome/images/sidebarbottom.gif" alt="sidebarbottom" /></div>	        <div class="sidebarboxtop"><img src="http://www.laruence.com/wp-content/themes/googlechrome/images/sidebartop.gif" alt="sidebartop" /></div><div class="sidebarbox">							<h3>Tags</h3>						<!-- SWFObject embed by Geoff Stearns geoff@deconcept.com http://blog.deconcept.com/swfobject/ --><script type="text/javascript" src="http://www.laruence.com/wp-content/plugins/wp-cumulus/swfobject.js"></script><div id="wpcumuluswidgetcontent1638328"><p><a href='http://www.laruence.com/tag/apache' class='tag-link-42' title='6 topics' style='font-size: 11.1204819277pt;'>Apache</a>
<a href='http://www.laruence.com/tag/apc' class='tag-link-223' title='6 topics' style='font-size: 11.1204819277pt;'>apc</a>
<a href='http://www.laruence.com/tag/bug' class='tag-link-75' title='5 topics' style='font-size: 10.5301204819pt;'>bug</a>
<a href='http://www.laruence.com/tag/c' class='tag-link-23' title='3 topics' style='font-size: 9.01204819277pt;'>C++</a>
<a href='http://www.laruence.com/tag/charset' class='tag-link-48' title='3 topics' style='font-size: 9.01204819277pt;'>charset</a>
<a href='http://www.laruence.com/tag/cookie' class='tag-link-21' title='2 topics' style='font-size: 8pt;'>COOKIE</a>
<a href='http://www.laruence.com/tag/core' class='tag-link-224' title='6 topics' style='font-size: 11.1204819277pt;'>core</a>
<a href='http://www.laruence.com/tag/debug' class='tag-link-53' title='2 topics' style='font-size: 8pt;'>debug</a>
<a href='http://www.laruence.com/tag/engine' class='tag-link-57' title='2 topics' style='font-size: 8pt;'>engine</a>
<a href='http://www.laruence.com/tag/extension' class='tag-link-18' title='5 topics' style='font-size: 10.5301204819pt;'>Extension</a>
<a href='http://www.laruence.com/tag/get' class='tag-link-19' title='2 topics' style='font-size: 8pt;'>GET</a>
<a href='http://www.laruence.com/tag/ie' class='tag-link-36' title='3 topics' style='font-size: 9.01204819277pt;'>IE</a>
<a href='http://www.laruence.com/tag/javascript' class='tag-link-9' title='14 topics' style='font-size: 13.9036144578pt;'>javascript</a>
<a href='http://www.laruence.com/tag/js' class='tag-link-130' title='3 topics' style='font-size: 9.01204819277pt;'>js</a>
<a href='http://www.laruence.com/tag/json' class='tag-link-79' title='3 topics' style='font-size: 9.01204819277pt;'>json</a>
<a href='http://www.laruence.com/tag/module' class='tag-link-43' title='2 topics' style='font-size: 8pt;'>Module</a>
<a href='http://www.laruence.com/tag/mysql' class='tag-link-13' title='4 topics' style='font-size: 9.85542168675pt;'>mysql</a>
<a href='http://www.laruence.com/tag/nginx' class='tag-link-187' title='4 topics' style='font-size: 9.85542168675pt;'>nginx</a>
<a href='http://www.laruence.com/tag/php' class='tag-link-17' title='136 topics' style='font-size: 22pt;'>PHP</a>
<a href='http://www.laruence.com/tag/php5-4' class='tag-link-440' title='4 topics' style='font-size: 9.85542168675pt;'>PHP5.4</a>
<a href='http://www.laruence.com/tag/php5-4%e6%96%b0%e7%89%b9%e6%80%a7' class='tag-link-470' title='12 topics' style='font-size: 13.313253012pt;'>PHP5.4新特性</a>
<a href='http://www.laruence.com/tag/php7' class='tag-link-614' title='4 topics' style='font-size: 9.85542168675pt;'>PHP7</a>
<a href='http://www.laruence.com/tag/php-extension' class='tag-link-344' title='5 topics' style='font-size: 10.5301204819pt;'>PHP extension</a>
<a href='http://www.laruence.com/tag/php%e5%8e%9f%e7%90%86' class='tag-link-107' title='4 topics' style='font-size: 9.85542168675pt;'>php原理</a>
<a href='http://www.laruence.com/tag/php%e5%ba%94%e7%94%a8' class='tag-link-98' title='3 topics' style='font-size: 9.01204819277pt;'>PHP应用</a>
<a href='http://www.laruence.com/tag/php%e6%89%a9%e5%b1%95' class='tag-link-345' title='3 topics' style='font-size: 9.01204819277pt;'>PHP扩展</a>
<a href='http://www.laruence.com/tag/php%e6%ba%90%e7%a0%81' class='tag-link-94' title='4 topics' style='font-size: 9.85542168675pt;'>php源码</a>
<a href='http://www.laruence.com/tag/php%e6%ba%90%e7%a0%81%e5%88%86%e6%9e%90' class='tag-link-160' title='9 topics' style='font-size: 12.3855421687pt;'>php源码分析</a>
<a href='http://www.laruence.com/tag/sapi' class='tag-link-60' title='4 topics' style='font-size: 9.85542168675pt;'>SAPI</a>
<a href='http://www.laruence.com/tag/session' class='tag-link-164' title='5 topics' style='font-size: 10.5301204819pt;'>session</a>
<a href='http://www.laruence.com/tag/utf8' class='tag-link-7' title='2 topics' style='font-size: 8pt;'>utf8</a>
<a href='http://www.laruence.com/tag/valgrind' class='tag-link-600' title='3 topics' style='font-size: 9.01204819277pt;'>valgrind</a>
<a href='http://www.laruence.com/tag/variable' class='tag-link-72' title='2 topics' style='font-size: 8pt;'>variable</a>
<a href='http://www.laruence.com/tag/vim' class='tag-link-5' title='3 topics' style='font-size: 9.01204819277pt;'>vim</a>
<a href='http://www.laruence.com/tag/yac' class='tag-link-589' title='3 topics' style='font-size: 9.01204819277pt;'>yac</a>
<a href='http://www.laruence.com/tag/yaf' class='tag-link-343' title='13 topics' style='font-size: 13.6506024096pt;'>Yaf</a>
<a href='http://www.laruence.com/tag/yar' class='tag-link-571' title='3 topics' style='font-size: 9.01204819277pt;'>Yar</a>
<a href='http://www.laruence.com/tag/zendphp' class='tag-link-58' title='12 topics' style='font-size: 13.313253012pt;'>Zend/PHP</a>
<a href='http://www.laruence.com/tag/%e4%b9%b1%e7%a0%81' class='tag-link-6' title='2 topics' style='font-size: 8pt;'>乱码</a>
<a href='http://www.laruence.com/tag/%e5%8e%9f%e7%90%86' class='tag-link-205' title='3 topics' style='font-size: 9.01204819277pt;'>原理</a>
<a href='http://www.laruence.com/tag/%e5%bc%80%e5%8f%91php%e6%89%a9%e5%b1%95' class='tag-link-114' title='3 topics' style='font-size: 9.01204819277pt;'>开发php扩展</a>
<a href='http://www.laruence.com/tag/%e5%bc%82%e6%ad%a5' class='tag-link-30' title='2 topics' style='font-size: 8pt;'>异步</a>
<a href='http://www.laruence.com/tag/%e6%80%a7%e8%83%bd' class='tag-link-210' title='3 topics' style='font-size: 9.01204819277pt;'>性能</a>
<a href='http://www.laruence.com/tag/%e6%89%a9%e5%b1%95%e5%bc%80%e5%8f%91' class='tag-link-444' title='6 topics' style='font-size: 11.1204819277pt;'>扩展开发</a>
<a href='http://www.laruence.com/tag/%e6%ad%a3%e5%88%99' class='tag-link-191' title='3 topics' style='font-size: 9.01204819277pt;'>正则</a>	<a href="http://www.laruence.com/category/gnuc" title="View all posts filed under GNU C/C++">GNU C/C++</a> (8)<br />
	<a href="http://www.laruence.com/category/jscss" title="View all posts filed under Js/CSS">Js/CSS</a> (24)<br />
	<a href="http://www.laruence.com/category/os" title="View all posts filed under Linux/Unix">Linux/Unix</a> (15)<br />
	<a href="http://www.laruence.com/category/mysqlpostgresql" title="View all posts filed under MySQL/PostgreSQL">MySQL/PostgreSQL</a> (7)<br />
	<a href="http://www.laruence.com/category/phpext" title="View all posts filed under PHP Extension">PHP Extension</a> (19)<br />
	<a href="http://www.laruence.com/category/php-usage" title="View all posts filed under PHP应用">PHP应用</a> (168)<br />
	<a href="http://www.laruence.com/category/php-internal" title="PHP源码分析, Zend内核解析">PHP源码分析</a> (79)<br />
	<a href="http://www.laruence.com/category/%e8%bd%ac%e8%bd%bd" title="View all posts filed under 转载">转载</a> (32)<br />
	<a href="http://www.laruence.com/category/notes" title="View all posts filed under 随笔">随笔</a> (89)<br />
</p><p>WP Cumulus Flash tag cloud by <a href="http://www.roytanck.com">Roy Tanck</a> and <a href="http://lukemorton.co.uk/">Luke Morton</a> requires <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a> 9 or better.</p></div><script type="text/javascript">var widget_so5857302 = new SWFObject("http://www.laruence.com/wp-content/plugins/wp-cumulus/tagcloud.swf?r=7359798", "tagcloudflash", "260", "260", "9", "#ffffff");widget_so5857302.addParam("wmode", "transparent");widget_so5857302.addParam("allowScriptAccess", "always");widget_so5857302.addVariable("tcolor", "0x333333");widget_so5857302.addVariable("tcolor2", "0x333333");widget_so5857302.addVariable("hicolor", "0x000000");widget_so5857302.addVariable("tspeed", "100");widget_so5857302.addVariable("distr", "true");widget_so5857302.addVariable("mode", "both");widget_so5857302.addVariable("tagcloud", "%3Ctags%3E%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fapache%27+class%3D%27tag-link-42%27+title%3D%276+topics%27+style%3D%27font-size%3A+11.1204819277pt%3B%27%3EApache%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fapc%27+class%3D%27tag-link-223%27+title%3D%276+topics%27+style%3D%27font-size%3A+11.1204819277pt%3B%27%3Eapc%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fbug%27+class%3D%27tag-link-75%27+title%3D%275+topics%27+style%3D%27font-size%3A+10.5301204819pt%3B%27%3Ebug%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fc%27+class%3D%27tag-link-23%27+title%3D%273+topics%27+style%3D%27font-size%3A+9.01204819277pt%3B%27%3EC%2B%2B%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fcharset%27+class%3D%27tag-link-48%27+title%3D%273+topics%27+style%3D%27font-size%3A+9.01204819277pt%3B%27%3Echarset%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fcookie%27+class%3D%27tag-link-21%27+title%3D%272+topics%27+style%3D%27font-size%3A+8pt%3B%27%3ECOOKIE%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fcore%27+class%3D%27tag-link-224%27+title%3D%276+topics%27+style%3D%27font-size%3A+11.1204819277pt%3B%27%3Ecore%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fdebug%27+class%3D%27tag-link-53%27+title%3D%272+topics%27+style%3D%27font-size%3A+8pt%3B%27%3Edebug%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fengine%27+class%3D%27tag-link-57%27+title%3D%272+topics%27+style%3D%27font-size%3A+8pt%3B%27%3Eengine%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fextension%27+class%3D%27tag-link-18%27+title%3D%275+topics%27+style%3D%27font-size%3A+10.5301204819pt%3B%27%3EExtension%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fget%27+class%3D%27tag-link-19%27+title%3D%272+topics%27+style%3D%27font-size%3A+8pt%3B%27%3EGET%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fie%27+class%3D%27tag-link-36%27+title%3D%273+topics%27+style%3D%27font-size%3A+9.01204819277pt%3B%27%3EIE%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fjavascript%27+class%3D%27tag-link-9%27+title%3D%2714+topics%27+style%3D%27font-size%3A+13.9036144578pt%3B%27%3Ejavascript%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fjs%27+class%3D%27tag-link-130%27+title%3D%273+topics%27+style%3D%27font-size%3A+9.01204819277pt%3B%27%3Ejs%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fjson%27+class%3D%27tag-link-79%27+title%3D%273+topics%27+style%3D%27font-size%3A+9.01204819277pt%3B%27%3Ejson%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fmodule%27+class%3D%27tag-link-43%27+title%3D%272+topics%27+style%3D%27font-size%3A+8pt%3B%27%3EModule%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fmysql%27+class%3D%27tag-link-13%27+title%3D%274+topics%27+style%3D%27font-size%3A+9.85542168675pt%3B%27%3Emysql%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fnginx%27+class%3D%27tag-link-187%27+title%3D%274+topics%27+style%3D%27font-size%3A+9.85542168675pt%3B%27%3Enginx%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fphp%27+class%3D%27tag-link-17%27+title%3D%27136+topics%27+style%3D%27font-size%3A+22pt%3B%27%3EPHP%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fphp5-4%27+class%3D%27tag-link-440%27+title%3D%274+topics%27+style%3D%27font-size%3A+9.85542168675pt%3B%27%3EPHP5.4%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fphp5-4%25e6%2596%25b0%25e7%2589%25b9%25e6%2580%25a7%27+class%3D%27tag-link-470%27+title%3D%2712+topics%27+style%3D%27font-size%3A+13.313253012pt%3B%27%3EPHP5.4%E6%96%B0%E7%89%B9%E6%80%A7%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fphp7%27+class%3D%27tag-link-614%27+title%3D%274+topics%27+style%3D%27font-size%3A+9.85542168675pt%3B%27%3EPHP7%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fphp-extension%27+class%3D%27tag-link-344%27+title%3D%275+topics%27+style%3D%27font-size%3A+10.5301204819pt%3B%27%3EPHP+extension%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fphp%25e5%258e%259f%25e7%2590%2586%27+class%3D%27tag-link-107%27+title%3D%274+topics%27+style%3D%27font-size%3A+9.85542168675pt%3B%27%3Ephp%E5%8E%9F%E7%90%86%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fphp%25e5%25ba%2594%25e7%2594%25a8%27+class%3D%27tag-link-98%27+title%3D%273+topics%27+style%3D%27font-size%3A+9.01204819277pt%3B%27%3EPHP%E5%BA%94%E7%94%A8%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fphp%25e6%2589%25a9%25e5%25b1%2595%27+class%3D%27tag-link-345%27+title%3D%273+topics%27+style%3D%27font-size%3A+9.01204819277pt%3B%27%3EPHP%E6%89%A9%E5%B1%95%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fphp%25e6%25ba%2590%25e7%25a0%2581%27+class%3D%27tag-link-94%27+title%3D%274+topics%27+style%3D%27font-size%3A+9.85542168675pt%3B%27%3Ephp%E6%BA%90%E7%A0%81%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fphp%25e6%25ba%2590%25e7%25a0%2581%25e5%2588%2586%25e6%259e%2590%27+class%3D%27tag-link-160%27+title%3D%279+topics%27+style%3D%27font-size%3A+12.3855421687pt%3B%27%3Ephp%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fsapi%27+class%3D%27tag-link-60%27+title%3D%274+topics%27+style%3D%27font-size%3A+9.85542168675pt%3B%27%3ESAPI%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fsession%27+class%3D%27tag-link-164%27+title%3D%275+topics%27+style%3D%27font-size%3A+10.5301204819pt%3B%27%3Esession%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Futf8%27+class%3D%27tag-link-7%27+title%3D%272+topics%27+style%3D%27font-size%3A+8pt%3B%27%3Eutf8%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fvalgrind%27+class%3D%27tag-link-600%27+title%3D%273+topics%27+style%3D%27font-size%3A+9.01204819277pt%3B%27%3Evalgrind%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fvariable%27+class%3D%27tag-link-72%27+title%3D%272+topics%27+style%3D%27font-size%3A+8pt%3B%27%3Evariable%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fvim%27+class%3D%27tag-link-5%27+title%3D%273+topics%27+style%3D%27font-size%3A+9.01204819277pt%3B%27%3Evim%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fyac%27+class%3D%27tag-link-589%27+title%3D%273+topics%27+style%3D%27font-size%3A+9.01204819277pt%3B%27%3Eyac%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fyaf%27+class%3D%27tag-link-343%27+title%3D%2713+topics%27+style%3D%27font-size%3A+13.6506024096pt%3B%27%3EYaf%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fyar%27+class%3D%27tag-link-571%27+title%3D%273+topics%27+style%3D%27font-size%3A+9.01204819277pt%3B%27%3EYar%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2Fzendphp%27+class%3D%27tag-link-58%27+title%3D%2712+topics%27+style%3D%27font-size%3A+13.313253012pt%3B%27%3EZend%2FPHP%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2F%25e4%25b9%25b1%25e7%25a0%2581%27+class%3D%27tag-link-6%27+title%3D%272+topics%27+style%3D%27font-size%3A+8pt%3B%27%3E%E4%B9%B1%E7%A0%81%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2F%25e5%258e%259f%25e7%2590%2586%27+class%3D%27tag-link-205%27+title%3D%273+topics%27+style%3D%27font-size%3A+9.01204819277pt%3B%27%3E%E5%8E%9F%E7%90%86%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2F%25e5%25bc%2580%25e5%258f%2591php%25e6%2589%25a9%25e5%25b1%2595%27+class%3D%27tag-link-114%27+title%3D%273+topics%27+style%3D%27font-size%3A+9.01204819277pt%3B%27%3E%E5%BC%80%E5%8F%91php%E6%89%A9%E5%B1%95%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2F%25e5%25bc%2582%25e6%25ad%25a5%27+class%3D%27tag-link-30%27+title%3D%272+topics%27+style%3D%27font-size%3A+8pt%3B%27%3E%E5%BC%82%E6%AD%A5%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2F%25e6%2580%25a7%25e8%2583%25bd%27+class%3D%27tag-link-210%27+title%3D%273+topics%27+style%3D%27font-size%3A+9.01204819277pt%3B%27%3E%E6%80%A7%E8%83%BD%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2F%25e6%2589%25a9%25e5%25b1%2595%25e5%25bc%2580%25e5%258f%2591%27+class%3D%27tag-link-444%27+title%3D%276+topics%27+style%3D%27font-size%3A+11.1204819277pt%3B%27%3E%E6%89%A9%E5%B1%95%E5%BC%80%E5%8F%91%3C%2Fa%3E%0A%3Ca+href%3D%27http%3A%2F%2Fwww.laruence.com%2Ftag%2F%25e6%25ad%25a3%25e5%2588%2599%27+class%3D%27tag-link-191%27+title%3D%273+topics%27+style%3D%27font-size%3A+9.01204819277pt%3B%27%3E%E6%AD%A3%E5%88%99%3C%2Fa%3E%3C%2Ftags%3E");widget_so5857302.addVariable("categories", "%09%3Ca+href%3D%22http%3A%2F%2Fwww.laruence.com%2Fcategory%2Fgnuc%22+title%3D%22View+all+posts+filed+under+GNU+C%2FC%2B%2B%22%3EGNU+C%2FC%2B%2B%3C%2Fa%3E+%288%29%3Cbr+%2F%3E%0A%09%3Ca+href%3D%22http%3A%2F%2Fwww.laruence.com%2Fcategory%2Fjscss%22+title%3D%22View+all+posts+filed+under+Js%2FCSS%22%3EJs%2FCSS%3C%2Fa%3E+%2824%29%3Cbr+%2F%3E%0A%09%3Ca+href%3D%22http%3A%2F%2Fwww.laruence.com%2Fcategory%2Fos%22+title%3D%22View+all+posts+filed+under+Linux%2FUnix%22%3ELinux%2FUnix%3C%2Fa%3E+%2815%29%3Cbr+%2F%3E%0A%09%3Ca+href%3D%22http%3A%2F%2Fwww.laruence.com%2Fcategory%2Fmysqlpostgresql%22+title%3D%22View+all+posts+filed+under+MySQL%2FPostgreSQL%22%3EMySQL%2FPostgreSQL%3C%2Fa%3E+%287%29%3Cbr+%2F%3E%0A%09%3Ca+href%3D%22http%3A%2F%2Fwww.laruence.com%2Fcategory%2Fphpext%22+title%3D%22View+all+posts+filed+under+PHP+Extension%22%3EPHP+Extension%3C%2Fa%3E+%2819%29%3Cbr+%2F%3E%0A%09%3Ca+href%3D%22http%3A%2F%2Fwww.laruence.com%2Fcategory%2Fphp-usage%22+title%3D%22View+all+posts+filed+under+PHP%E5%BA%94%E7%94%A8%22%3EPHP%E5%BA%94%E7%94%A8%3C%2Fa%3E+%28168%29%3Cbr+%2F%3E%0A%09%3Ca+href%3D%22http%3A%2F%2Fwww.laruence.com%2Fcategory%2Fphp-internal%22+title%3D%22PHP%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90%2C+Zend%E5%86%85%E6%A0%B8%E8%A7%A3%E6%9E%90%22%3EPHP%E6%BA%90%E7%A0%81%E5%88%86%E6%9E%90%3C%2Fa%3E+%2879%29%3Cbr+%2F%3E%0A%09%3Ca+href%3D%22http%3A%2F%2Fwww.laruence.com%2Fcategory%2F%25e8%25bd%25ac%25e8%25bd%25bd%22+title%3D%22View+all+posts+filed+under+%E8%BD%AC%E8%BD%BD%22%3E%E8%BD%AC%E8%BD%BD%3C%2Fa%3E+%2832%29%3Cbr+%2F%3E%0A%09%3Ca+href%3D%22http%3A%2F%2Fwww.laruence.com%2Fcategory%2Fnotes%22+title%3D%22View+all+posts+filed+under+%E9%9A%8F%E7%AC%94%22%3E%E9%9A%8F%E7%AC%94%3C%2Fa%3E+%2889%29%3Cbr+%2F%3E%0A");widget_so5857302.write("wpcumuluswidgetcontent1638328");</script>	        </div><div class="sidebarboxbottom"><img src="http://www.laruence.com/wp-content/themes/googlechrome/images/sidebarbottom.gif" alt="sidebarbottom" /></div>		<div class="sidebarboxtop"><img src="http://www.laruence.com/wp-content/themes/googlechrome/images/sidebartop.gif" alt="sidebartop" /></div><div class="sidebarbox"><h3>friends</h3>
	<ul class='xoxo blogroll'>
<li><a href="http://www.80sec.com/" title="安全界牛人">80Sec</a></li>
<li><a href="http://www.54chen.com" target="_blank">cc0cc</a></li>
<li><a href="http://www.cnxct.com">CFC4N</a></li>
<li><a href="http://demon.at/">Demon</a></li>
<li><a href="http://hi.baidu.com/erik168" target="_blank">Errorrik</a></li>
<li><a href="http://glemir.xplore.cn" target="_blank">glemir&#8217;s</a></li>
<li><a href="http://blog.iterse.com/" target="_blank">Iterse&#039;s BLOG</a></li>
<li><a href="http://www.skiyo.cn/" target="_blank">Jessica</a></li>
<li><a href="http://blog.zoeey.org/">moxie</a></li>
<li><a href="http://pangee.me/" target="_blank">Pangee</a></li>
<li><a href="http://pplxh.cublog.cn">pplxh</a></li>
<li><a href="http://www.rainx.cn/" rel="friend" target="_blank">rainX</a></li>
<li><a href="http://blog.libssh2.org/" rel="contact" target="_blank">Sara Golemon</a></li>
<li><a href="http://www.chenbin.net/" target="_blank">siko</a></li>
<li><a href="http://stauren.net" title="js牛人" target="_blank">stauren</a></li>
<li><a href="http://www.blankyao.cn" rel="friend" target="_blank">Think in code</a></li>
<li><a href="http://www.pureisle.net" target="_blank">三江小渡</a></li>
<li><a href="http://icyriver.net" title="卫斯理" target="_blank">冰的河</a></li>
<li><a href="http://liuqingyan.blogspot.com/" target="_blank">刘青炎</a></li>
<li><a href="http://www.sunqinglin.cn" title="孙清林博客" target="_blank">孙清林博客</a></li>
<li><a href="http://keyvalue.net/">思考的Pyt</a></li>
<li><a href="http://www.yanbin.org/" rel="contact" target="_blank">抚琴居</a></li>
<li><a href="http://www.wangxuntian.com/" target="_blank">王洛堇</a></li>
<li><a href="http://xiezhenye.com/" target="_blank">神仙</a></li>
<li><a href="http://blog.csdn.net/heiyeshuwu" rel="friend" target="_blank">黑夜路人</a></li>

	</ul>
</div><div class="sidebarboxbottom"><img src="http://www.laruence.com/wp-content/themes/googlechrome/images/sidebarbottom.gif" alt="sidebarbottom" /></div>
<div class="sidebarboxtop"><img src="http://www.laruence.com/wp-content/themes/googlechrome/images/sidebartop.gif" alt="sidebartop" /></div><div class="sidebarbox"><h3>Visitor ClustrMaps</h3>			<div class="textwidget"><a href="http://www4.clustrmaps.com/counter/maps.php?url=http://www.laruence.com" id="clustrMapsLink"><img src="http://www4.clustrmaps.com/counter/index2.php?url=http://www.laruence.com" style="border:0px;" alt="Locations of visitors to this page" title="Locations of visitors to this page" id="clustrMapsImg" onerror="this.onerror=null; this.src='http://www2.clustrmaps.com/images/clustrmaps-back-soon.jpg'; document.getElementById('clustrMapsLink').href='http://www2.clustrmaps.com';" />
</a></div>
		</div><div class="sidebarboxbottom"><img src="http://www.laruence.com/wp-content/themes/googlechrome/images/sidebarbottom.gif" alt="sidebarbottom" /></div>    </div>
</div> <!-- container -->
<div class="footerpush"></div>
</div> <!--wrapper -->
<div class='footer'>
	<div class="footercontent">
	&copy; <a href="http://www.laruence.com" title="Home">风雪之隅</a>/ <a href="http://www.php.net" target="_blank"><img src="http://www.laruence.com/wp-content/themes/googlechrome/images/php_logo.png" /></a>/ <a href=http://www.miibeian.gov.cn target=_blank>京ICP备15032766号</a>/ Theme By <a href="http://ericulous.com/2008/09/09/wp-theme-google-chrome" title="Smashing Wordpress Themes">Smashing</a>/ <span class="dia">由<a href="http://sae.sina.com.cn" target="_blank"><img src="http://static.sae.sina.com.cn/image/poweredby/117X12px.gif" title="Powered by Sina App Engine" /></a>提供稳定空间及带宽保障&nbsp;</span> </div>
 </div>
    </div>
</div>
<script type='text/javascript' src='http://www.laruence.com/wp-content/plugins/sem-subscribe-me/js/scripts.js?ver=20090906'></script>

<script type="text/javascript">

syntaxHilite();

function syntaxHilite() {
	var tab = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
	var codes = document.getElementsByTagName("pre");

	sh_highlightDocument();

	for(var i = 0; i < codes.length; i++) {
		if(codes[i].getAttribute("name") != "code") {
			continue;
		}

		var orig = codes[i].innerHTML;
		var nextline = "";
		var output = "";
		var lineBeginning = true;

		for(var j = 0; j < orig.length; j++) {
			var nextChar = orig.charAt(j);

			if(nextChar == '\r' || nextChar == '\n' || (j + 1) == orig.length ) {
				if(nextChar == '\r' && (j + 1) <= orig.length && orig.charAt(j + 1) == '\n') {
					j++;
				}

				if(nextline.length < 1) {
					nextline = "&nbsp;";
				}

				output += '<li>' + nextline + '</li>';
				nextline = "";
				lineBeginning = true;
			} else {
				if(nextChar == '\t') {
					nextline += tab;
				}
				else if(nextChar == ' ' && lineBeginning == true) {
					nextline += "&nbsp;";
				} else {
					lineBeginning = false;
					nextline += nextChar;
				}
			}
		}

		output = "<ol>" + output + '</ol>';
		codes[i].innerHTML = output;
	}
}

</script>
<script type="text/javascript">
//<![CDATA[
var si_captcha_styles = "\
<!-- begin SI Captcha Anti-Spam - comment form style -->\
<style type='text/css'>\
div#captchaImgDiv { display:block; }\
div#captchaSizeDivSmall { width:175px; height:45px; padding-top:10px; }\
div#captchaSizeDivLarge { width:250px; height:60px; padding-top:10px; }\
img#si_image_com,#si_image_reg,#si_image_log { border-style:none; margin:0; padding-right:5px; float:left; }\
img#captchaImgAudio { border-style:none; margin:0; vertical-align:top; }\
img#captchaImgRefresh { border-style:none; margin:0; vertical-align:bottom; }\
div#captchaInputDiv { display:block; padding-top:15px; padding-bottom:5px; }\
label#captcha_code_label { margin:0; }\
input#captcha_code { width:65px; }\
</style>\
<!-- end SI Captcha Anti-Spam - comment form style -->\
";
jQuery(document).ready(function($) {
$('head').append(si_captcha_styles);
});
//]]>
</script>
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<script type="text/javascript" src="http://js.tongji.linezing.com/728491/tongji.js"></script><noscript><a href="http://www.linezing.com"><img src="http://img.tongji.linezing.com/728491/tongji.gif"/></a></noscript>
</body>
</html>
